package com.zzptc.zzsgz.bdsjws.fragments;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.zzptc.zzsgz.bdsjws.R;
import com.zzptc.zzsgz.bdsjws.activities.OneKeySOSActivity;
import com.zzptc.zzsgz.bdsjws.fragments.base.BaseFragmentbase;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.Unbinder;

/**
 * Created by Administrator on 2017/5/26.
 */

public class FirstFragment extends BaseFragmentbase {
    @BindView(R.id.bt_sos)
    Button btSos;
    Unbinder unbinder;

    @Override
    public int getXML() {
        return R.layout.firstfragment;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initDate() {
    }

    @OnClick(R.id.bt_sos)
    public void onViewClicked() {
        //getFragmentManager().beginTransaction().hide().add(R.id.fl_soskey,new TwoFragment()).commit();
        //首先要获得宿主 宿主Activity怎么管理Freagment
        if(getActivity() instanceof OneKeySOSActivity){
            //调用Activity中方法
            ((OneKeySOSActivity) getActivity()).toTwoActivity();
        }
    }
}
